package com.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

/**挂号单**/
public class RegisterDoc {
    private String patientName;
    private int id;
    private int sex;
    private Date creatDate;
    private String cost;
    private String department;
    private String workId;
    private String doctorName;
    private String account;
    private int isAccomplish;//是否挂号已使用  数据库中为int型

    @Override
    public String toString() {
        return "RegisterDoc{" +
                "patientName='" + patientName + '\'' +
                ", id=" + id +
                ", sex=" + sex +
                ", creatDate=" + creatDate +
                ", cost='" + cost + '\'' +
                ", department='" + department + '\'' +
                ", workId='" + workId + '\'' +
                ", doctorName='" + doctorName + '\'' +
                ", account='" + account + '\'' +
                ", isAccomplish=" + isAccomplish +
                '}';
    }

    public RegisterDoc(String patientName, int id, int sex, Date creatDate,
                       String cost, String department, String workId, String doctorName, String account){
        this.cost = cost;
        this.creatDate = creatDate;
        this.department = department;
        this.doctorName = doctorName;
        this.id = id;
        this.patientName = patientName;
        this.sex = sex;
        this.workId = workId;
        this.account = account;
        this.isAccomplish = 0;

    }

    public RegisterDoc(){
        this.isAccomplish = 0;
    }

    public RegisterDoc(String patientName, int sex, Date creatDate, String cost, String department,
                       String workId, String doctorName, String account) {
        this.patientName = patientName;
        this.sex = sex;
        this.creatDate = creatDate;
        this.cost = cost;
        this.department = department;
        this.workId = workId;
        this.doctorName = doctorName;
        this.account = account;
        this.isAccomplish = 0;
    }

    public String getCreatDateFormat(){
        SimpleDateFormat sdf = new SimpleDateFormat();// 格式化时间
        sdf.applyPattern("yyyy-MM-dd HH:mm:ss");// a为am/pm的标记
        return sdf.format(this.creatDate);
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getSex() {
        return sex;
    }

    public String getSexString() {
        if(this.sex==1)
            return "男";
        else
            return "女";
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public Date getCreatDate() {
        return creatDate;
    }

    public void setCreatDate(Date createDate) {
        this.creatDate = createDate;
    }

    public String getCost() {
        return cost;
    }

    public void setCost(String cost) {
        this.cost = cost;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getWorkId() {
        return workId;
    }

    public void setWorkId(String workId) {
        this.workId = workId;
    }

    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public int getIsAccomplish(){
        return this.isAccomplish;
    }

    public String getIsAccomplishString() {
        if(isAccomplish==1)
            return "是";
        else
            return "否";
    }

    public void setAccomplish(int accomplish) {
        isAccomplish = accomplish;
    }
}
